{% extends 'account/account_base.html' %}

{% block content %}
<div class="centered">
    <div class="information">
        <h2>Edit your account</h2>
        <div class="line"></div>
        <p>You can edit your account using the following from:</p>
        {{ user_form.errors }}
        {{ user_form.errors }}
        <form action="{% url 'user_edit' %}" method="POST" enctype="multipart/form-data">
            {% csrf_token %}
            <div>
                {% for field in user_form %}
                <div class="fields">
                    {% if field.errors %}
                        <div style="color: #FF2238; font-weight: bold;" class="label-errors">{{ field.label }}</div>
                        <div class="field-errors">{{ field }}</div>
                    {% else %}
                        {{ field.label }}
                        {{ field }}
                    {% endif %}
                </div>
                {% endfor %}
                {% for field in profile_form %}
                <div class="fields">
                    {% if field.errors %}
                        <div style="color: #FF2238; font-weight: bold;" class="label-errors">{{ field.label }}</div>
                        <div class="field-errors">{{ field }}</div>
                    {% else %}
                        {{ field.label }}
                        {{ field }}
                    {% endif %}
                </div>
                {% endfor %}
            </div>
            <button type="submit" class="btn btn-success">Edit</button>
        </form>
    </div>
</div>
{% endblock content %}
